<?php
declare (strict_types = 1);

namespace app\api\controller\v1;
use app\api\model\City as ModelCity;
use think\facade\Request;
use app\api\validate\City as ValidateCity;
/**
 * 市管理类
 */
class City extends Api
{
    /**
     * 获取所有市
     */
    public function index()
    {
        $data = Request::get();
        validate(ValidateCity::class)->scene('getCity')->check($data);
        $data = ModelCity::getAllCity($data);
        exit(json_encode($data));
    }

}